package com.springcloudalibaba.apiPay.service;

import com.alipay.api.AlipayApiException;
import org.springframework.scheduling.annotation.Async;
import org.springframework.web.servlet.ModelAndView;


import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @description: 阿里巴巴支付回调服务
 * @author: lixing
 * @time: 2021/7/9 8:21
 */
public interface AlibabaPayCallbackService {
    /**
     * @描述 支付成功后，点击页面的完成按钮回调
     * @作者 lixing
     * @日期 2021/7/9 8:23
     * @Param [request]
     */
    @Async("asyncTaskExecutor")
    ModelAndView returnUrl(HttpServletRequest request, HttpServletResponse response) throws IOException, AlipayApiException;

    /**
     * @描述 支付成功异步回调
     * @作者 lixing
     * @日期 2021/7/9 8:24
     * @Param [request]
     */
    @Async("asyncTaskExecutor")
    void notifyUrl(HttpServletRequest request, HttpServletResponse response) throws IOException, AlipayApiException;
}
